home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr49 / 273_01.zip / SCROLLLF.CC < prev    next >
Text File  |  1993-04-04  |  746b  |  25 lines

  1. scroll_lf(int trow, int tcol, int brow, int bcol, int attr, int no_col)
  2. /* This will scroll the window defined by trow, tcol, brow, bcol to the
  3.    left the number of columns indicated by no_col.  The columns exposed
  4.    after scrolling are set to spaces and are given the attribute specified    
  5.    by attr.
  6. */
  7. {
  8.     register int x, row, col;
  9.     char hold[160];
  10.     if(bcol - tcol + 1 - no_col < 0) return(1);
  11.     if(!no_col) return(0);
  12.     for(row=trow; row <= brow; row++) {
  13.         for(x=0,col=tcol;col <= bcol;col++) {
  14.             sread_ca(row,col,&hold[x]);
  15.             x += 2;
  16.         }
  17.         for(x=(no_col * 2),col=tcol;col <= (bcol - no_col); col++) {
  18.             swrite_ca(row,col,&hold[x]);
  19.             x += 2;
  20.         }
  21.     }
  22.     scroll_up(trow,bcol-no_col+1,brow,bcol,attr,0);
  23.     return(0);
  24. }
  25.